// ==UserScript==
// @name         FA page jump
// @namespace    http://tampermonkey.net/
// @version      0.1.1
// @description  Bring the 'Page' option back
// @author       Linhq1999
// @match        https://www.furaffinity.net/search/*
// @grant        none
// ==/UserScript==

'use strict';
(function () {
    let currentPage = document.querySelector("#search-results .highlight").innerText.split("#");
    let searchbox = document.querySelector("#q");
    let pNext = document.createElement("input");
    pNext.name = "page";
    pNext.type = "text";
    pNext.className = "textbox";
    pNext.value = currentPage[1];
    pNext.style = "width: 80px;";
    searchbox.parentNode.insertBefore(pNext, searchbox.querySelector("button"));
    // Prevent reset
    let reset = document.createElement("input");
    reset.name = "reset_page";
    reset.type = "hidden";
    reset.value = "";
    searchbox.appendChild(reset);

})();